package com.znsd.dining.room.controller.shopping;/*@autho:JL
 */

import com.znsd.dining.room.pojo.Shopping;
import com.znsd.dining.room.service.ShoppingService;
import com.znsd.dining.room.vo.Shopping_store_menu;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("shopping")
public class ShoppingController {
    @Autowired
   private  ShoppingService shoppingService;
    // 查询 购物车 里面的商品
    @RequestMapping("selectShopping")//@PathVariable("userId")Integer userId,@PathVariable("storeId") Integer storeId
    public List<Shopping_store_menu> shoppingsList(){
         System.out.println("进来这个控制器");
        List<Shopping_store_menu> shoppings = shoppingService.selectListShopping(1,1);
        System.out.println(shoppings);
        return shoppings;
    }
}
